package com.hclc.yxb.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.hclc.entity.model.series.CustomLocalDateTimeSerializer;
import com.hclc.entity.model.series.DeCustomLocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>部门</p>
 * @author hef
 * @since 2020-08-19
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(chain = true)
@TableName("`t_sys_dept`")
public class SysDeptModel implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value="`id`", type= IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;

    /**
     * 父id
     */
    @TableField(value = "`parent_id`")
    @ApiModelProperty(value = "父id")
    private String parentId;

    /**
     * 祖先结点id集（','分隔）
     */
    @TableField(value = "`parent_ids`")
    @ApiModelProperty(value = "祖先结点id集（','分隔）")
    private String parentIds;

    /**
     * 负责人
     */
    @TableField(value = "`leader`")
    @ApiModelProperty(value = "负责人")
    private String leader;

    /**
     * 联系电话
     */
    @TableField(value = "`phone`")
    @ApiModelProperty(value = "联系电话")
    private String phone;

    /**
     * 邮箱
     */
    @TableField(value = "`mail`")
    @ApiModelProperty(value = "邮箱")
    private String mail;

    /**
     * 是否有效(1:有效,0:无效)
     */
    @TableField(value = "`enable`")
    @ApiModelProperty(value = "是否有效(1:有效,0:无效)")
    private Integer enable;

    /**
     * 备注
     */
    @TableField(value = "`remark`")
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 状态
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value = "状态")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "`create_time`", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    @JsonDeserialize(using = DeCustomLocalDateTimeSerializer.class)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "`update_time`", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    @JsonDeserialize(using = DeCustomLocalDateTimeSerializer.class)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime updateTime;

    /**
     * 创建时间(时间戳)
     */
    @TableField(value = "`create_time_timestamp`", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间(时间戳)")
    private Long createTimeTimestamp;

    /**
     * 更新时间(时间戳)
     */
    @TableField(value = "`update_time_timestamp`", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间(时间戳)")
    private Long updateTimeTimestamp;


}
